const state = {
  scale: 1, // 刻度尺缩放
  pageData: {
    width: 1920, // 页面默认宽度
    height: 1080, // 页面默认高度
    offset: 20, // 偏移量
    background: "#232324", // 画布背景色
    previewType: "强行拉伸", // 预览页面类型
    backgroundImg: "", // 背景图片
  },
  echartsData: {
    width: 500,
    height: 300,
  },
  borderColor: {
    color: ["#6586ec", "#2cf7fe"],
    background: "rgba(0,0,0,0)",
    value: {
      name: "边框-04",
      width: 250,
      height: 32,
      fontSize: 18,
      color: "#ffffff",
    },
    textColor: "#ffffff",
    textSize: 18,
    dataset: "ABC Time",
    datasetTwo: "我是标题",
    rotateZ: 0,
    rotateX: 0,
    rotateY: 0,
  },
  timeDefault: {
    color: "#ffffff",
    fontSize: 24,
    fontWeight: "normal",
    spacing: 2,
    shadowShow: true,
    shadowx: 2,
    shadowy: 2,
    shadows: 8,
    shadowColor: "#0075ff",
  },
  textDefault: {
    value: "我是文本",
    color: "#ffffff",
    fontSize: 14,
    fontWeight: "normal",
    center: "center",
    spacing: 5,
    border: 0,
    borderColor: "#ffffff",
    borderRadius: 5,
    background: "transparent",
    href: "",
    xPadding: 10,
    yPadding: 10,
    http: "http://",
    gradientValue: "我是渐变文本",
    gradientRotate: 45,
    gradientColor: ["#0083FF", "#00E2FF"],
  },
  scrollListData: {
    contentColor: "#1370fb",
    lineColor: "#1e3b67",
    valueColor: "#ffffff",
    numfontSize: 12,
    namefontSize: 12,
    valuefontSize: 12,
    classOption: {
      step: 1, // 数值越大速度滚动越快
      limitMoveNum: 1, // 开始无缝滚动的数据量 this.dataList.length
      hoverStop: true, // 是否开启鼠标悬停stop
      direction: 1, // 0向下 1向上 2向左 3向右
      openWatch: true, // 开启数据实时监控刷新dom
      singleHeight: 44, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
      singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
      waitTime: 400,
    },
    listData: [
      {
        id: 1,
        number: "No.1",
        name: "河南",
        value: 100,
      },
      {
        id: 2,
        number: "No.2",
        name: "河北",
        value: 90,
      },
      {
        id: 3,
        number: "No.3",
        name: "河东",
        value: 80,
      },
      {
        id: 4,
        number: "No.4",
        name: "河西",
        value: 70,
      },
      {
        id: 5,
        number: "No.5",
        name: "河上",
        value: 60,
      },
      {
        id: 6,
        number: "No.6",
        name: "河下",
        value: 50,
      },
      {
        id: 7,
        number: "No.7",
        name: "河左",
        value: 40,
      },
      {
        id: 8,
        number: "No.8",
        name: "河右",
        value: 30,
      },
      {
        id: 9,
        number: "No.9",
        name: "河右",
        value: 20,
      },
      {
        id: 10,
        number: "No.10",
        name: "河右",
        value: 10,
      },
    ],
  },
  scrollListTable: {
    titleHeight: 35,
    trNum: 5,
    titleColor: "#00BAFF",
    oddColor: "#003B51",
    evenColor: "#0A2732",
    comlus: ["ID", "列1", "列2", "列3"],
    dataList: [
      {
        value1: 1,
        value2: "行1列1",
        value3: "行1列2",
        value4: "行1列3",
      },
      {
        value1: 2,
        value2: "行2列1",
        value3: "行2列2",
        value4: "行2列3",
      },
      {
        value1: 3,
        value2: "行3列1",
        value3: "行3列2",
        value4: "行3列3",
      },
      {
        value1: 4,
        value2: "行4列1",
        value3: "行4列2",
        value4: "行4列3",
      },
      {
        value1: 5,
        value2: "行5列1",
        value3: "行5列2",
        value4: "行5列3",
      },
      {
        value1: 6,
        value2: "行6列1",
        value3: "行6列2",
        value4: "行6列3",
      },
      {
        value1: 7,
        value2: "行7列1",
        value3: "行7列2",
        value4: "行7列3",
      },
      {
        value1: 8,
        value2: "行8列1",
        value3: "行8列2",
        value4: "行8列3",
      },
      {
        value1: 9,
        value2: "行9列1",
        value3: "行9列2",
        value4: "行9列3",
      },
      {
        value1: 10,
        value2: "行10列1",
        value3: "行10列2",
        value4: "行10列3",
      },
    ],
    classOption: {
      step: 1, // 数值越大速度滚动越快
      limitMoveNum: 1, // 开始无缝滚动的数据量 this.dataList.length
      hoverStop: true, // 是否开启鼠标悬停stop
      direction: 1, // 0向下 1向上 2向左 3向右
      openWatch: true, // 开启数据实时监控刷新dom
      singleHeight: 50, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
      singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
      waitTime: 400,
    },
  },
  photoData: {
    src: "src/assets/tb-icon/default.png",
    rotate: false,
  },
  videoData: {
    src: "src/assets/videos/earth.mp4",
    mute: true,
    loop: true,
  },
  waterData: {
    type: "水流滚动",
    time: 1000,
    height: 15,
    color: "#2DA3F8",
    backgroundColor: "#2B5B8A",
    position: "left",
    x: 0,
    y: 0,
  },
};
const actions = {
  pageDataFunc({ commit, state }) {
    const pageData = {
      width: 1920, // 页面默认宽度
      height: 1080, // 页面默认高度
      offset: 20, // 偏移量
      background: "#232324", // 画布背景色
      previewType: "强行拉伸", // 预览页面类型
      backgroundImg: "", // 背景图片
    };
    commit("PAGE_DATA", pageData);
  },
};
const mutations = {
  SCALE: (state, scale) => {
    state.scale = scale;
  },
  PAGE_DATA: (state, pageData) => {
    state.pageData = pageData;
  },
  BORDER_COLOR: (state, borderColor) => {
    state.borderColor = borderColor;
  },
  TEXT_DEFAULT: (state, textDefault) => {
    state.textDefault = textDefault;
  },
  SCROLL_LIST_DATA: (state, scrollListData) => {
    state.scrollListData = scrollListData;
  },
  SCROLL_LIST_TABLE: (state, scrollListTable) => {
    state.scrollListTable = scrollListTable;
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
